<!-- 礼包管理 -->
<div class="easyui-layout" data-options="fit:true,border:false">
    <div id="mainContent" data-options="region:'north',height:'auto',border:false" style="overflow:hidden;">
        <div class="searchIndex">
            <ul >
                <li>
                    <label>关键字:</label>
                    <input class="base-input" name="orderNo" />
                </li>
                <li>
                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-searchWin8',plain:true">查询</a>
                </li>
            </ul>
        </div>
    </div>
    <div data-options="region:'center',border:false">
        <div id="indexButton" style="padding-left:10px;">
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add-win8',plain:true" onClick="$('#addfactory').dialog('open')">新增礼包</a>
            <!--<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-trackRecordwin8',plain:true" onClick="$('#editfactory').dialog('open')">修改</a>-->
            <!-- <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-searchWin8',plain:true" onClick="$('#lookfactory').dialog('open')">查看</a> -->
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-removeWin8',plain:true" onClick="">批量删除</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-upload',plain:true" onClick="">导入</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-download',plain:true" onClick="">导出</a>
        </div>
        <table class="easyui-datagrid" data-options="url:'../../json/replyEdit.asp',toolbar:'#indexButton',pagination:true,fit:true,autoRowHeight:false,rownumbers:true,border:false,fitColumns:true,nowrap:false,onDblClickRow:lookfactoryone,method:'get'">
            <thead>
                <tr>
                    <th data-options="field:'ck',checkbox:true"></th>
                    <th data-options="field:'orderNo',width:100,align:'center'">排序</th>
                    <th data-options="field:'giftName',width:100,align:'center'">礼包套餐名称</th>
                    <th data-options="field:'giftTime',width:200,align:'center'">礼包有效期</th>
                    <th data-options="field:'receiveNum',width:100,align:'center'">直接领用号数量</th>
                    <th data-options="field:'receivedNum',width:100,align:'center'">已领取数量</th>
                    <th data-options="field:'unreceiveNum',width:100,align:'center'">未领取数量</th>
                    <th data-options="field:'huntNum',width:100,align:'center'">淘号数量</th>
                    <th data-options="field:'11',width:200,align:'center',formatter:PageObject.gameUserFormatter">操作</th>
                </tr>
            </thead>
        </table>
    </div>
</div> 

<!-- 新增礼包 -->
<div id="addfactory" class="easyui-dialog" data-options="title:'新增礼包',closable:true,closed:true,modal:true,width:500,height:500,buttons:'#createBranchBtn'">
    <div class="con_form">
        <ul >
            <li>
                <label>排序:</label>
                <input class="base-input" name="orderNo" style="width:320px;" />
            </li>
            <li>
                <label>礼包名称:</label>
                <input class="base-input" name="orderNo" style="width:320px;" />
            </li>
            <li>
                <label>礼包有效期:</label>
                <input id="startDate" class="easyui-datebox" editable=false name="orderDataStart" style="width:150px;" />&nbsp;至&nbsp;
                <input id="endDate" class="easyui-datebox" editable=false name="orderDataEnd" style="width:150px;" />
            </li>
            <li>
                <label>礼包内容:</label>
                <textarea class="textareaBox"></textarea>
            </li>
            <li>
                <label>使用方法:</label>
                <textarea class="textareaBox"></textarea>
            </li>
        </ul>
    </div>
    <div id="createBranchBtn">
        <center>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8'" onClick="$.messager.alert('提示','保存成功！','info');">保存</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-closeWin8'" onClick="$('#addfactory').dialog('close')">取消</a>
        </center>
    </div>
</div>
<!-- 修改礼包 -->
<div id="editfactory" class="easyui-dialog" data-options="title:'修改礼包',closable:true,closed:true,modal:true,width:500,height:500,buttons:'#editBranchBtn'">
    <div class="con_form">
        <ul >
            <li>
                <label>排序:</label>
                <input class="base-input" name="orderNo" style="width:320px;" value="01" />
            </li>
            <li>
                <label>礼包名称:</label>
                <input class="base-input" name="orderNo" style="width:320px;" value="XXX" />
            </li>
            <li>
                <label>礼包有效期:</label>
                <input id="startDate" class="easyui-datebox" editable=false name="orderDataStart" style="width:150px;" />&nbsp;至&nbsp;
                <input id="endDate" class="easyui-datebox" editable=false name="orderDataEnd" style="width:150px;" />
            </li>
            <li>
                <label>礼包内容:</label>
                <textarea class="textareaBox">XXXXXXXXXX</textarea>
            </li>
            <li>
                <label>使用方法:</label>
                <textarea class="textareaBox">PPPPPPPPP</textarea>
            </li>
        </ul>
    </div>

    <div id="editBranchBtn">
        <center>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8'" onClick="$.messager.alert('提示','保存成功！','info');">保存</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-closeWin8'" onClick="$('#editfactory').dialog('close')">关闭</a>
        </center>
    </div>
</div>

<!-- 兑换码 -->
<div id="exchangeCodeDialog" class="easyui-dialog" data-options="title:'兑换码管理',href:'../../content/gameManage/exchangeCode.html',closable:true,closed:true,modal:true,width:1000,height:550,buttons:'#exchangeCodeDialogBtn'">
    <div id="exchangeCodeDialogBtn">
        <center>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8'" onClick="$.messager.alert('提示','保存成功！','info');">保存</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-closeWin8'" onClick="$('#exchangeCodeDialog').dialog('close')">关闭</a>
        </center>
    </div>
</div>

<script type="text/javascript">
    function lookfactoryone(rowIndex, rowData){
        $('#lookfactory').dialog('open');
    }
    ;(function($,window, PageObject){
        // 格式化datagrid(修改最后一列数据为详情)
        PageObject.gameUserFormatter = function (value, row, rowIndex) {
            return "<a href='javascript:void(0);' style='color:blue;' onclick='$(\"#exchangeCodeDialog\").dialog(\"open\");'>兑换码</a><a href='javascript:void(0);' style='color:blue;margin-left:10px;' onclick='$(\"#editfactory\").dialog(\"open\");'>编辑</a><a href='javascript:void(0);' style='color:blue;margin-left:10px;' onclick='PageObject.gameUserDetail();'>删除</a>";
        };
    })(jQuery,window, window.PageObject = {});

</script>